﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EzDesk.Core.Model;
using System.Runtime.Serialization;

namespace EzDesk.Apps.Model.Attendance
{
    /// <summary>
    /// 考勤类型
    /// </summary>
    [DataContract]
    public enum AttendanceType
    {
        [EnumMember]
        onDuty = 0,  // 上班
        [EnumMember]
        offDuty = 1,  // 下班
    }

    [DataContract]
    public class AttendanceInfo : IModel
    {
        [DataMember]
        public Guid Id { get; set; }
        [DataMember]
        public Guid UserId { get; set; }
        [DataMember]
        public DateTime Date { get; set; }
        [DataMember]
        public AttendanceType AttendanceType { get; set; }
        [DataMember]
        public DateTime ActionTime { get; set; }
        [DataMember]
        public string Explanation { get; set; }
        [DataMember]
        public bool IsAbnormalAttendance { get; set; }
    }
}
